#pragma once
#include "yzrutil.h"
#include "DSP3D.h"
#include "RingBuffer.h"
#include "BiquadIIR.h"

namespace yzrilyzr_io{
	class InputStream;
}
namespace yzrilyzr_dsp{
	ECLASS(Simple3D, public DSP3D){
	private:
	RingBufferSample lDelayBuf;
	RingBufferSample rDelayBuf;
	u_sample lDelay=0;
	u_sample rDelay=0;
	u_sample_rate sampleRate=0;
	BiquadIIR distanceFilterL;
	BiquadIIR distanceFilterR;
	BiquadIIR lHeadShadowFilter;
	BiquadIIR rHeadShadowFilter;
	BiquadIIR lPinnaFilter;
	BiquadIIR rPinnaFilter;
	public:
	Simple3D(){}
	u_sample procDsp(u_sample v) override;
	void init(u_sample_rate sampleRate) override;
	void resetMemory() override;
	std::shared_ptr<DSP> cloneDSP() override;
	~Simple3D(){}
	void cloneParam(DSP * obj1)override;
	void posChange()override;
	yzrilyzr_lang::String toString()const override;
	};
}